home *** CD-ROM | disk | FTP | other *** search
/ Java for 3D & VRML Worlds / Java for 3d and VRML Worlds.iso / vs / browser / cpn11b1.exe / DATA.Z / sphere.wrl < prev    next >
Text File  |  1996-11-06  |  1KB  |  62 lines

  1. #VRML V2.0 utf8
  2.  
  3. # Copyright(C) 1996 Sony Corporation. All rights reserved.
  4.  
  5.  
  6. #NavigationInfo{
  7. #    headlight FALSE
  8. #    type            [ "WALK" ]
  9. #}
  10.  
  11. WorldInfo {
  12.     title "Sphere"
  13.     info [
  14.         "Gravity:   on",
  15.     ]
  16. }
  17.  
  18. Background {
  19.     skyColor 0.1 0.1 0.3
  20. }
  21.  
  22. DEF SphereTransform Transform{
  23.     translation 0 0 3
  24.     children [
  25.     Shape{
  26.             appearance  Appearance{
  27.                 material DEF SphereMaterial Material{
  28.                     diffuseColor 0.0 1.0 1.0
  29.                 }
  30.             }
  31.         geometry Sphere{}
  32.     }
  33.     DEF SphereTouchSensor TouchSensor{}
  34.     ]
  35. }
  36.  
  37. DEF SphereTimeSensor TimeSensor{
  38.     loop TRUE
  39.     stopTime -1
  40.     cycleInterval 5
  41. }
  42.  
  43. DEF SpherePositionInterpolator PositionInterpolator{
  44.     key [0, 0.5, 1]
  45.     keyValue[ 0 2 0, 0 -2 0, 0 2 0]
  46. }
  47.  
  48.  
  49. DEF SphereScript Script{
  50.     url "../scripts/sphere.class"
  51.     eventIn        SFBool    SphereClicked
  52.     eventOut    SFColor    SphereDiffuseColor
  53. }
  54.  
  55.  
  56. ROUTE    SphereTouchSensor.isActive TO SphereScript.SphereClicked
  57. ROUTE    SphereScript.SphereDiffuseColor TO SphereMaterial.set_diffuseColor
  58. ROUTE    SphereTimeSensor.fraction_changed TO SpherePositionInterpolator.set_fraction
  59. ROUTE    SpherePositionInterpolator.value_changed TO SphereTransform.set_translation
  60.  
  61.  
  62.